﻿@using SH = EMoney.IStock.Client.Framework.StringHelper;
@using EMoney.IStock.Client.Models.QQ;
@using EMoney.IStock.Client.Framework;
@{
    Layout = null;
    string ranktype = ViewBag.RankType;
    string time = "";
}
<table width="100%" border="0" cellspacing="0" cellpadding="0">
    @{
        List<Rank> rank_lst = (List<Rank>)ViewBag.RankLst;

        if (rank_lst != null && rank_lst.Count > 0)
        {

            int i = 0;
            foreach (Rank rank in rank_lst)
            {
                string nickname = EncryptionUtil.Encrypt(rank.nickname);
                //var syl = ranktype == "1" ? SH.DecimalFormatColor(rank.week_earning) : ranktype == "2" ? SH.DecimalFormatColor(rank.day_earning) : SH.DecimalFormatColor(rank.total_earning);
                var ra = ranktype == "1" ? rank.rank_week_key : ranktype == "2" ? rank.rank_day_key : rank.rank_key;
                if (i == 0)
                {
                    time = rank.c_time;
                } 
        <tr ondblclick="return ShowGSJM('@(rank.user_qq)','@nickname');">
            <td width="10%" align="center" valign="middle">@(ra)</td>
            <td width="15%" align="center" valign="middle"><span class="yellow" onclick="return ShowGSJM('@(rank.user_qq)','@nickname');" title="@(rank.nickname)">@(SH.StringSubstrLen(rank.nickname,10))</span></td>
            <td width="15%" align="center" valign="middle">@(SH.DecimalFormatColor(rank.total_earning))</td>
            <td width="15%" align="center" valign="middle"><span class="red">@(rank.total_asset)</span></td>
            <td width="15%" align="center" valign="middle">@(rank.position)</td>
            <td width="15%" align="center" valign="middle">@(SH.DecimalFormatColor(rank.week_earning))</td>
            <td width="15%" align="center" valign="middle">@(SH.DecimalFormatColor(rank.day_earning))</td>
        </tr>
                i++;
            }
        }
        else
        {
        <tr>
            <td colspan="5" style="text-align: center;">--无记录--</td>
        </tr>
        }
    }
</table>
